package com.hr.controller;


import com.hr.entity.AoaPosition;
import com.hr.service.AoaPositionService;
import com.netflix.loadbalancer.PingUrl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * (AoaPosition)表控制层
 *
 * @author makejava
 * @since 2022-06-21 20:29:11
 */
@RestController
@RequestMapping("aoaPosition")
public class AoaPositionController {
    /**
     * 服务对象
     */
    @Autowired
    private AoaPositionService aoaPositionService;

    /**
     * 查询职位列表
     * @return
     */
    @RequestMapping("/queryList")
    public List<AoaPosition> queryList(){
        return aoaPositionService.queryList();
    }

    /**
     * 保存或修改
     * @param aoaPosition
     * @return
     */
    @PostMapping("/save")
    public boolean save(
            @RequestBody AoaPosition aoaPosition) {
        return aoaPositionService.save(aoaPosition);
    }

    /**
     * 单值查询
     * @param id
     * @return
     */
    @GetMapping("/queryById")
    public AoaPosition queryByID(Integer id) {
        return aoaPositionService.queryByID(id);
    }
}

